<template>
  <div class="comment-list">
    <article-comment
      v-for="comment in comments"
      :key="comment.id"
      :comment="comment"
    />
  </div>
</template>

<script lang="ts">
  import ArticleComment from './ArticleComment/index.vue'
  import { defineComponent, PropType } from 'vue'
  export default defineComponent({
    components: {
      ArticleComment
    },
    props: {
      comments: {
        type: Array as PropType<ArticleComment[]>,
        required: true
      }
    }
  })
</script>

<style lang="scss" scoped>
  .comment-list {
    padding: 20px 0;
  }
</style>